package com.ribbon.loadstrategy;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * 负载均衡配置，配置服务消费者调用服务提供者的调用策略
 * 自动化配置
 * */
@Configuration
public class BalanceConfiguration {

    @Bean
    public IRule ribbonRule(){
        return new RandomRule();
    }

}
